package com.masterrabbit.controller;

import com.masterrabbit.domain.Merchants;
import com.masterrabbit.service.MerchantsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class MerchantsController {
    @Autowired
    private MerchantsService merchantsService;

    @GetMapping("/merchants")
    public List<Merchants> select(Double longitude, Double latitude) {
        System.out.println(longitude);
        System.out.println(latitude);
        return merchantsService.selectMerchantsList();
    }

}
